package com.dana1.nos.data;

import java.util.Collection;
import java.util.UUID;

import com.dana1.nos.old.ServiceObject;
import com.dana1.nos.old.generator.TimeBasedUUIDGenerator;
import com.dana1.nos.old.meta.GeneratedBy;
import com.dana1.nos.old.meta.InverseOf;
import com.dana1.nos.old.meta.KeyField;
import com.dana1.nos.old.meta.Serialized;
import com.dana1.nos.old.meta.UniqueWithin;

public interface User extends SecureObject, ManagedObject, ServiceObject
{
	@KeyField
	@GeneratedBy(TimeBasedUUIDGenerator.class)
	public UUID getUserId();
	public void setUserId(UUID i);
	
	@UniqueWithin("username")
	public String getUsername();
	public void setUsername(String s);

	public String getPassword();
	public void setPassword(String s);
	
	@InverseOf("usersAtAddress")
	public Collection<Address> getAddresses();

	public Address getPrimaryAddress();
	public void setPrimaryAddress(Address a);
	
	@Serialized
	public byte [] getPhoto();
	public void setPhoto(byte [] b);
}
